Description
This manual connection member function requests an event from the connected splitter. If there is an event available then it is opened and TRUE returned. If there are no events available, and the splitter's reentrancy has not been exceeded (see Object Reentrancy) then the splitter will issue another request to its provider. If this request completes within the specified timeout then the splitter will provide the event and TRUE will be returned, otherwise FALSE will be returned. Before reading this topic, we would recommend familiarity with Manual Connections and Splitters.
Prototype
Uns WaitEvent( Uns timeout );
Parameters
timeout
This parameter determines whether the connection will poll or block (see Connection Timeout). It can be set to poll (CLP_POLL), block (CLP_WAIT) or a millisecond timeout.
Return Value
This function returns logical TRUE if an event is successfully retrieved within the timeout period; or FALSE otherwise.
Notes
If an event is successfully retrieved then it can be inspected using the following member functions;
Status()
This member function returns the connection's event status. Following a successful request the function will return CLP_EVENT_OPEN. If the request timed out it will return CLP_EVENT_TIMED_OUT.
IsOpen()
This member function returns TRUE if the connection is 'Open' or FALSE otherwise.
EventNum()
This member function returns the retrieved event's sequence number. Numbering starts from zero (the first retrieved event).
LinkNum()
This member function returns the consuming connection's link number.